﻿@{
    ViewBag.Title = "Raise";
}
@model DiaosFix.Web.MVC.Models.RaiseRequestModelWrapper
<h2>
    Raise a Request</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@if (!(ViewBag.ErrorMessage as string).IsEmpty())
{
    <p>Error: @ViewBag.ErrorMessage</p>
}
else
{
    using (Html.BeginForm())
    {
    @Html.ValidationSummary(true, "Input data is not correct.")
    
    <fieldset>
    <legend>Request Details</legend>
        <h3>
            Step 1. Select a Request Area</h3>

        @Html.DropDownListFor(m => m.PostModel.RequestAreaName, Model.GetModel)

        <h3>
            Step 2. What's your fucking detail?</h3>
        <p>
            @Html.LabelFor(m => m.PostModel.RequestDescription)</p>
        <div>
            @Html.TextAreaFor(m => m.PostModel.RequestDescription)
            @Html.ValidationMessageFor(m => m.PostModel.RequestDescription)
        </div>
        <p>
            <input type="submit" value="Submit Request" />
        </p>
    </fieldset>
    }
}